#pragma once
#include<stdio.h>
#include<stdlib.h>
#include<time.h>
#include<stdbool.h>

typedef int HPDateType;

typedef struct Heap
{
	HPDateType* a;
	int size;
	int capacity;
}HP;

void Swap(HPDateType* p1, HPDateType* p2);
void HeapInit(HP* ph);
void HeapDestroy(HP* ph);
void HeapPush(HP* ph, HPDateType x);
void HeapPop(HP* ph);
void HeapPrint(HP* ph);
bool HeapEmpty(HP* ph);
HPDateType HeapTop(HP* ph);
void InsertSort(int* a, int n);
void ShellSort(int* a, int n);
void QuickSort(int* a, int begin, int end);
void MergeSort(int* a, int n);

